package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.mapper.DtsAdminMapper;
import com.qf.pojo.DtsAdmin;
import com.qf.service.DtsAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author lixu
 */
@Service
public class DtsAdminServiceImpl extends ServiceImpl<BaseMapper<DtsAdmin>,DtsAdmin> implements DtsAdminService {

/*    @Autowired
    private DtsAdminMapper dtsAdminMapper;*/
    /**
     * 根据名称查询管理员对象
     * @param username
     * @return
     */
    @Override
    public DtsAdmin findDtsAdminByUsername(String username) {
        return getBaseMapper().selectOne(new QueryWrapper<DtsAdmin>()
                .eq("username", username));

    }
}
